//package com.eagle.depthinspringboot.overview.web.servlet;
//
//import org.springframework.boot.autoconfigure.web.servlet.WebMvcProperties;
//import org.springframework.boot.web.servlet.ServletComponentScan;
//
//import javax.servlet.AsyncContext;
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
///**
// * My Servlet
// *
// * @author: eagle
// * @since: 2018/12/30
//*/
//////同步
////@WebServlet(urlPatterns = "/myServlet")
////异步
//@WebServlet(urlPatterns = "/myServlet",asyncSupported = true)
//public class MyServlet extends HttpServlet {
//
////	//同步
////	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
////			throws ServletException, IOException
////	{
////		resp.getWriter().println("hello eagle");
////	}
//
//	//异步
//	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
//			throws ServletException, IOException
//	{
//		AsyncContext asyncContext = req.startAsync();
//		asyncContext.start(()->{
//			try {
//				resp.getWriter().println("hello eagle");
//				asyncContext.complete();
//			} catch (IOException e) {
//				e.printStackTrace();
//			}
//		});
//
//	}
//}
